Interrupt 21h Function 71AAh Minor Code 2h 

Determines if the specified drive is associated with a path and, if it is, retrieves the associated path.

mov ax, 71aah            ; SUBST

mov bh, 2                ; Query SUBST

mov bl, DriveNum         ; see below

mov dx, seg PathName     ; see below

mov ds, dx

mov dx, offset PathName

int 21h

 

jc error

 

Parameters

DriveNum

Drive to SUBST. This parameter can 1 for A, 2 for B, and so on. Note that DriveNum cannot be 0 to indicate the default drive.

PathName

Address of buffer that receives the null-terminated string of the path associated with the specified drive. The buffer must be of MAXPATHLEN size.

 

Return Value

Clears the carry flag and retrieves the associated path in the specified buffer if successful. Otherwise, the function sets the carry flag and returns an error value in the AX register.